package com.atguigu.mall.product.service;

import com.atguigu.common.utils.PageUtils;
import com.atguigu.mall.product.entity.CategoryEntity;
import com.atguigu.mall.product.vo.Catelog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author Mr·L
 * @email 907298149@qq.com
 * @date 2021-12-02 20:39:46
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询树
     * @param name
     * @param isDisable
     * @return
     */
    List<CategoryEntity> listWithTree(String name,Integer isDisable);

    /**
     * 根据 分类id
     * @param categoryId
     * @return
     */
    List<CategoryEntity> queryChildrenListById(Long categoryId);
    /**
     * 查询path
     * @param categoryId
     * @return
     */
    List<Long> queryPathListById(Long categoryId);

    /**
     * 修改并更新 pms_category_brand_relation
     * @param category
     */
    void updateByCategory(CategoryEntity category);

    /**
     * 查询所有一级分类
     * @return
     */
    List<CategoryEntity> getLevel1Categorys();

    /**
     * 查询前台菜单分类
     * @return
     */
    Map<String, List<Catelog2Vo>> getCatalogJson();
}

